<script>
    /*订票机票点击事件*/
    $('.btn_search').click(function () {
        var id = $(this).data('id');
        var r = confirm("确认是否订购该机票？");
        if (r){
            $.get('/checkLogin', function (data){
                if (!data.success) {
                    popup("请先登录");
                    return;
                }
                window.location.href="/flight/order?id="+ id;
                // $.get('/flight/order',{'id':$(this).data('id')})
            })
        } else{
            popup("取消预订!");
        }
    });
</script>
<#list list as air>
    <div id="flight_list" style="">
    <div class="f-list ng-scope" ng-repeat="one in result.flights|orderBy:sort.key:sort.type" ng-if="loaded">
        <div class="f-item" ng-attr-id="{{ 'airline-item-' + one.flight_no }}" ng-click="showSubInfo(one)"
             id="airline-item-9C8542">
            <div class="f-item-info ng-scope" ng-if="one.flight_no" style="position: relative">
                <div class="f-line">
                            <span class="airline-logo"><i ng-attr-id="{{ 'logo-item-' + one.flight_no }}"
                                                          id="logo-item-9C8930" class="airline-logo-9C"></i></span>
                    <p class="f-name ng-binding">${(air.airplinename)!'航班'}<span class="ng-binding"></span>
                    </p>
                    <p class="sub ng-binding">${(air.flightnumber)!'航班号'}</p>
                </div>
                <div class="f-time">
                    <div class="time ng-binding" ng-bind="one.dep_time">${(air.startflytime?string('MM-dd HH:ss'))!'起飞时间'}
                    </div>
                    <p class="sub ng-binding">${(air.startdest.name)!'起飞'}机场</p>
                </div>
                <div class="through">
                    <div>
                        途径${air.startdest.name}...
                    </div>
                    <div class="arrow">
                        →
                    </div>
                </div>
                <div class="f-time">
                    <div class="time ng-binding" ng-bind="one.arr_time">${(air.endflytime?string('MM-dd HH:ss'))!'降落时间'}
                    </div>
                    <p class="sub ng-binding">${(air.endflydest.name)!'降落'}机场</p>
                </div>
                <div class="item item-btn btn_search" data-id="${air.id}">
                    <a>订购</a>
                </div>
            </div>
        </div>
    </div>
</div>
</#list>